<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<script>
    
    var chargeVo = ${charge};
    
    charge.selectList("corp", 1);
    charge.selectList("dept", 2);
    charge.selectList("user", 3);  
</script>
<div id="page-content" class="page-content">
    <div class="monitor">
        <form id="chargeForm">
            <div class="monitorLeft">
            		<div class="form-group">
						<label class="col-sm-4 control-label">机构：</label>
						<div class="col-sm-7 ">
							<div class="pr">
								<select name="corp" id="corp"  class="form-control input-sm"></select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-4 control-label">所属部门：</label>
						<div class="col-sm-7 ">
							<div class="pr">
								<select name="dept" id="dept"  class="form-control input-sm"></select>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-4 control-label">业务员：</label>
						<div class="col-sm-7 ">
							<div class="pr">
								<select name="user" id="user"  class="form-control input-sm"></select>
							</div>
						</div>
					</div>
     
                  <div class="form-group dateContainer">
                    <label class="col-sm-4 control-label">开始时间：</label>
                    <div class="col-sm-7 ">
                        <div class="pr">
                            <input id="startTime" name="startTime" class="form-control datepicker" type="text"
                                   onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')||\'5020-01-01\'}'})"
                                   value="<fmt:formatDate value='${charge.startTime }' pattern='yyyy-MM-dd' />"/>
                        </div>
                    </div>
                </div>
                <div class="form-group dateContainer">
                    <label class="col-sm-4 control-label">结束时间：</label>
                    <div class="col-sm-7 ">
                        <div class="pr">
                            <input id="endTime" name="endTime" class="form-control datepicker" type="text"
                                   onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',maxDate:'5020-10-01'})"
                                    value="<fmt:formatDate value='${charge.endTime }' pattern='yyyy-MM-dd' />"/>
                        </div>
                    </div>
                </div>
            </div>

            <!-- log.searchLoginLog() 定义在work.js的文件里面 -->
            <div class="monitorRight">
                <a href="javascript:void(0);" class="btnSearch"
                   onclick="charge.search();">查询</a>
               <a href="javascript:void(0);" class="btnSearch"
                   onclick="charge.exportExcel();">导出</a>
            </div>
        </form>
    </div>
    <div class="clearfix"></div>

    <div class="portlet-body">
        <div class="table-scrollable">
            <table class="table table-condensed flip-content">
                <thead class="flip-content">
                <tr>
                    <th width="10%">机构名称</th>
                    <th width="10%">部门名称</th>
                    <th width="10%">操作员</th>
                    <th width="10%">收费次数</th>
                    <th width="10%">应收费用</th>
                    <th width="10%">实收费用</th>
                </tr>
                </thead>
                <tbody id="select_tbody">
                <c:if test="${result.code eq 'SUCCESS' }">
                    <c:forEach items="${result.data}" var="row" varStatus="status">
                        <tr>
                            <td width="10%" class="">
                                ${row.corpName }
                            </td>
                            <td width="10%" class="">${row.dept }</td>
                            <td width="10%" class="">${row.userName }</td>
                            <td width="10%" class="">${row.count }</td>
                            <td width="10%" class=""><fmt:formatNumber value="${row.dueCharge }" type="currency" pattern=".00"/></td>
                            <td width="10%" class=""><fmt:formatNumber value="${row.dueCharge }" type="currency" pattern=".00"/></td>
                        </tr>
                    </c:forEach>
                </c:if>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>

</script>
